<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<demo  class="btn"  onclick="alert(1)"></demo>
		</div>
	</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const app = Vue.createApp({})
    app.component('demo', {
       // props: ['variable'],
		inheritAttrs:false,//用来控制是否加载上面按钮中的属性事件
        template: `<button>我是按钮</button>`,	
		mounted(){	
			console.log(this.$attrs);
		}
		
    })
    app.mount("#app")
</script>

</html>
